import "react-app-polyfill/stable";
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { Provider } from "react-redux";
import store from "@/store/store";
import { ConfigProvider } from "antd";
import { get, post, postBlob, postMedia, postJson, put, deletefn } from "@/api/index";
import TheIcons from "./components/TheIcons";
import { showDeleteConfirm, showMessage } from "@/components/TheConfirm/index";
import { transNumber } from "@/utils/numberTrans";
import "moment/locale/zh-cn";
import locale from "antd/lib/locale/zh_CN";
import moment from "moment";
import FormCheckbox from "./components/FormItem/FormCheckbox";
import FormDatePicker from "./components/FormItem/FormDatePicker";
import FormInputNumber from "./components/FormItem/FormInputNumber";
import FormPassword from "./components/FormItem/FormPassword";
import FormRadio from "./components/FormItem/FormRadio";
import FormSelect from "./components/FormItem/FormSelect";
import FormTextarea from "./components/FormItem/FormTextarea";
import FormTreeSelect from "./components/FormItem/FormTreeSelect";
import FormInput from "./components/FormItem/FormInput";
import Price from "./components/TheMoney";
import getFilterAuth from "@/utils/getFilterAuth";
import { TITLE } from "@/utils/golbal";

// 04-06 采购迭代前线上版本

React.$get = get;
React.$post = post;
React.$put = put;
React.$delete = deletefn;
React.$postBlob = postBlob;
React.$postMedia = postMedia;
React.$postJson = postJson;
React.$confirm = showDeleteConfirm;
React.$message = showMessage;
React.$moment = moment;
React.$Icons = TheIcons;
React.FormInput = FormInput;
React.FormCheckbox = FormCheckbox;
React.FormDatePicker = FormDatePicker;
React.FormInputNumber = FormInputNumber;
React.FormPassword = FormPassword;
React.FormSelect = FormSelect;
React.FormRadio = FormRadio;
React.FormTextarea = FormTextarea;
React.FormTreeSelect = FormTreeSelect;
React.$getFilterAuth = getFilterAuth;
React.$Price = Price;
React.$price = Price;
React.$transNum = transNumber; // 数字转换乘100或除100的转换方法
React.$title = TITLE;
// React.$BaseUrl = process.env.NODE_ENV ==='development'?'/management':'/pro-management/management';
React.$BaseUrl = process.env.NODE_ENV ==='development'?'https://management-test.muzhiqi.cn':'https://management.hqmpet.com';
console.log(React.$BaseUrl );
document.title = TITLE;
const AppView = (
  <Provider store={store}>
    <ConfigProvider locale={locale}>
      <App />
    </ConfigProvider>
  </Provider>
);
ReactDOM.render(AppView, document.getElementById("root"));
